﻿@model SusuCMS.Page
@using (Html.BeginForm())
{
    <dl class="form">
        <dt>
            @Html.LabelFor(m => m.Title)
        </dt>
        <dd>
            @Html.TextBoxFor(m => m.Title)
            @Html.ValidationMessageFor(m => m.Title)
        </dd>
        <dt>
            @Html.LabelFor(m => m.Url)
        </dt>
        <dd>
            http://@Request.Url.Authority/
            @Html.TextBoxFor(m => m.Url, new { @class = "url-input" })
            @Html.ValidationMessageFor(m => m.Url)
        </dd>
        <dt>
            @Html.LabelFor(m => m.IsPublished)
            @Html.CheckBoxFor(m => m.IsPublished)
        </dt>
        <dt>
            @Html.LabelFor(m => m.Content)
        </dt>
        <dd>
            @Html.TextAreaFor(m => m.Content)
        </dd>
        @Html.Partial("Extension", Model)
        <dd>
            @Html.HiddenFor(m => m.PageTypeId)
            @Html.HiddenFor(m => m.WebsiteId)
            @Html.HiddenFor(m => m.Id)
            <button type="submit">@("Save".Localize())</button>
        </dd>
    </dl>
}
<script src="@Url.Content("~/Areas/Admin/Scripts/ckeditor/ckeditor_basic.js")" type="text/javascript"></script>
<script type="text/javascript">
    CKEDITOR.replace('Content', {
        filebrowserBrowseUrl: '<%=ResolveUrl("~/ckfinder/ckfinder.html")%>',
        filebrowserImageBrowseUrl: '<%=ResolveUrl("~/ckfinder/ckfinder.html?Type=Images")%>',
        filebrowserFlashBrowseUrl: '<%=ResolveUrl("~/ckfinder/ckfinder.html?Type=Flash")%>',
        filebrowserUploadUrl: '<%=ResolveUrl("~/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files")%>',
        filebrowserImageUploadUrl: '<%=ResolveUrl("~/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images")%>',
        filebrowserFlashUploadUrl: '<%=ResolveUrl("~/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash")%>'
    }); 
</script>
